home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / fastwe1a / frmoptio.frm (.txt) < prev    next >
Visual Basic Form  |  1999-10-19  |  9KB  |  283 lines

  1. VERSION 5.00
  2. Begin VB.Form frmOptions 
  3.    BackColor       =   &H00000000&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Options"
  6.    ClientHeight    =   2370
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   7305
  10.    Icon            =   "frmOptions.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   2370
  15.    ScaleWidth      =   7305
  16.    StartUpPosition =   3  'Windows Default
  17.    Begin VB.Timer Timer1 
  18.       Interval        =   200
  19.       Left            =   0
  20.       Top             =   1920
  21.    End
  22.    Begin VB.CommandButton cmdSaveOptions 
  23.       Caption         =   "&Save Options"
  24.       Height          =   255
  25.       Left            =   5040
  26.       TabIndex        =   5
  27.       Top             =   1920
  28.       Width           =   2055
  29.    End
  30.    Begin VB.CheckBox chkShowPaths 
  31.       BackColor       =   &H00000000&
  32.       Height          =   255
  33.       Left            =   2040
  34.       TabIndex        =   4
  35.       Top             =   1920
  36.       Width           =   255
  37.    End
  38.    Begin VB.TextBox txtHome2URL 
  39.       Alignment       =   2  'Center
  40.       BackColor       =   &H00404040&
  41.       BorderStyle     =   0  'None
  42.       BeginProperty Font 
  43.          Name            =   "Tahoma"
  44.          Size            =   12
  45.          Charset         =   0
  46.          Weight          =   400
  47.          Underline       =   0   'False
  48.          Italic          =   0   'False
  49.          Strikethrough   =   0   'False
  50.       EndProperty
  51.       ForeColor       =   &H00FFFFFF&
  52.       Height          =   285
  53.       Left            =   2040
  54.       MaxLength       =   50
  55.       TabIndex        =   2
  56.       Top             =   960
  57.       Width           =   5055
  58.    End
  59.    Begin VB.TextBox txtSearchURL 
  60.       Alignment       =   2  'Center
  61.       BackColor       =   &H00404040&
  62.       BorderStyle     =   0  'None
  63.       BeginProperty Font 
  64.          Name            =   "Tahoma"
  65.          Size            =   12
  66.          Charset         =   0
  67.          Weight          =   400
  68.          Underline       =   0   'False
  69.          Italic          =   0   'False
  70.          Strikethrough   =   0   'False
  71.       EndProperty
  72.       ForeColor       =   &H00FFFFFF&
  73.       Height          =   285
  74.       Left            =   2040
  75.       MaxLength       =   50
  76.       TabIndex        =   3
  77.       Top             =   1320
  78.       Width           =   5055
  79.    End
  80.    Begin VB.TextBox txtHome1URL 
  81.       Alignment       =   2  'Center
  82.       BackColor       =   &H00404040&
  83.       BorderStyle     =   0  'None
  84.       BeginProperty Font 
  85.          Name            =   "Tahoma"
  86.          Size            =   12
  87.          Charset         =   0
  88.          Weight          =   400
  89.          Underline       =   0   'False
  90.          Italic          =   0   'False
  91.          Strikethrough   =   0   'False
  92.       EndProperty
  93.       ForeColor       =   &H00FFFFFF&
  94.       Height          =   285
  95.       Left            =   2040
  96.       MaxLength       =   50
  97.       TabIndex        =   1
  98.       Top             =   600
  99.       Width           =   5055
  100.    End
  101.    Begin VB.TextBox txtStartingURL 
  102.       Alignment       =   2  'Center
  103.       BackColor       =   &H00404040&
  104.       BorderStyle     =   0  'None
  105.       BeginProperty Font 
  106.          Name            =   "Tahoma"
  107.          Size            =   12
  108.          Charset         =   0
  109.          Weight          =   400
  110.          Underline       =   0   'False
  111.          Italic          =   0   'False
  112.          Strikethrough   =   0   'False
  113.       EndProperty
  114.       ForeColor       =   &H00FFFFFF&
  115.       Height          =   285
  116.       Left            =   2040
  117.       MaxLength       =   50
  118.       TabIndex        =   0
  119.       Top             =   240
  120.       Width           =   5055
  121.    End
  122.    Begin VB.Label Label4 
  123.       BackColor       =   &H00000000&
  124.       Caption         =   "Show Paths"
  125.       BeginProperty Font 
  126.          Name            =   "Tahoma"
  127.          Size            =   12
  128.          Charset         =   0
  129.          Weight          =   700
  130.          Underline       =   0   'False
  131.          Italic          =   0   'False
  132.          Strikethrough   =   0   'False
  133.       EndProperty
  134.       ForeColor       =   &H00FFFFFF&
  135.       Height          =   285
  136.       Left            =   240
  137.       TabIndex        =   10
  138.       ToolTipText     =   "Refresh"
  139.       Top             =   1920
  140.       Width           =   1695
  141.    End
  142.    Begin VB.Label Label3 
  143.       BackColor       =   &H00000000&
  144.       Caption         =   "Home2 URL"
  145.       BeginProperty Font 
  146.          Name            =   "Tahoma"
  147.          Size            =   12
  148.          Charset         =   0
  149.          Weight          =   700
  150.          Underline       =   0   'False
  151.          Italic          =   0   'False
  152.          Strikethrough   =   0   'False
  153.       EndProperty
  154.       ForeColor       =   &H00FFFFFF&
  155.       Height          =   285
  156.       Left            =   240
  157.       TabIndex        =   9
  158.       ToolTipText     =   "Refresh"
  159.       Top             =   960
  160.       Width           =   1695
  161.    End
  162.    Begin VB.Label Label2 
  163.       BackColor       =   &H00000000&
  164.       Caption         =   "Search URL"
  165.       BeginProperty Font 
  166.          Name            =   "Tahoma"
  167.          Size            =   12
  168.          Charset         =   0
  169.          Weight          =   700
  170.          Underline       =   0   'False
  171.          Italic          =   0   'False
  172.          Strikethrough   =   0   'False
  173.       EndProperty
  174.       ForeColor       =   &H00FFFFFF&
  175.       Height          =   285
  176.       Left            =   240
  177.       TabIndex        =   8
  178.       ToolTipText     =   "Refresh"
  179.       Top             =   1320
  180.       Width           =   1695
  181.    End
  182.    Begin VB.Label Label1 
  183.       BackColor       =   &H00000000&
  184.       Caption         =   "Home URL"
  185.       BeginProperty Font 
  186.          Name            =   "Tahoma"
  187.          Size            =   12
  188.          Charset         =   0
  189.          Weight          =   700
  190.          Underline       =   0   'False
  191.          Italic          =   0   'False
  192.          Strikethrough   =   0   'False
  193.       EndProperty
  194.       ForeColor       =   &H00FFFFFF&
  195.       Height          =   285
  196.       Left            =   240
  197.       TabIndex        =   7
  198.       ToolTipText     =   "Refresh"
  199.       Top             =   600
  200.       Width           =   1695
  201.    End
  202.    Begin VB.Label lblRefresh 
  203.       BackColor       =   &H00000000&
  204.       Caption         =   "Starting URL"
  205.       BeginProperty Font 
  206.          Name            =   "Tahoma"
  207.          Size            =   12
  208.          Charset         =   0
  209.          Weight          =   700
  210.          Underline       =   0   'False
  211.          Italic          =   0   'False
  212.          Strikethrough   =   0   'False
  213.       EndProperty
  214.       ForeColor       =   &H00FFFFFF&
  215.       Height          =   285
  216.       Left            =   240
  217.       TabIndex        =   6
  218.       ToolTipText     =   "Refresh"
  219.       Top             =   240
  220.       Width           =   1695
  221.    End
  222. Attribute VB_Name = "frmOptions"
  223. Attribute VB_GlobalNameSpace = False
  224. Attribute VB_Creatable = False
  225. Attribute VB_PredeclaredId = True
  226. Attribute VB_Exposed = False
  227. Private Sub chkShowPaths_Click()
  228.     'changed, timer will enable save button
  229.     bHasOptionsChanged = True
  230. End Sub
  231. Private Sub cmdSaveOptions_Click()
  232.     'save the options to the options file
  233.     fSaveOptions
  234.     'disable the save button, timer will re-enable
  235.     'if something changes
  236.     cmdSaveOptions.Enabled = False
  237. End Sub
  238. Private Sub Form_Unload(Cancel As Integer)
  239.     'unload the options screen
  240.     Unload frmOptions
  241. End Sub
  242. Private Sub fSaveOptions()
  243.     'assign the options on screen to the structure
  244.     Options.Home1URL = txtHome1URL.Text
  245.     Options.Home2URL = txtHome2URL.Text
  246.     Options.SearchURL = txtSearchURL.Text
  247.     Options.ShowPaths = chkShowPaths.Value
  248.     'set start url to '-' if nothing entered
  249.     If RTrim(txtStartingURL.Text) = "" Then
  250.         Options.StartURL = "-"
  251.     Else
  252.         Options.StartURL = txtStartingURL.Text
  253.     End If
  254.     'save the options
  255.     Open App.Path & "\options.web" For Random As #1 Len = Len(Options)
  256.         Put #1, 1, Options
  257.     Close #1
  258. End Sub
  259. Private Sub Timer1_Timer()
  260.     'changed, timer will enable save button
  261.     If bHasOptionsChanged <> False